package com.cloud.drore.eboss.sso.dao;

import com.cloud.drore.eboss.sso.entity.Function;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Transactional
@Service
public interface FunctionDao  extends BaseDao<Function, Long> {
	 
	@Query("from Function ")
	public List<Function> findList();

	public List<Function> findListByTenantId(String project);
	
	public Function findByRightCode(String rightCode);
	 

	public Function findByPid(Integer pid);
	@Query("from Function where pid=?")
	public List<Function> findListByPid(Long pid);

	public List<Function> findByTenantId(String tenantId);
} 